package com.wise.service.cms.content.agentcountry;

import com.wise.entities.content.AgentCountry;
import com.wise.framework.dao.SqlSelect;
import com.wise.framework.daomodel.DaoList;
import com.wise.summer.v1.cms.content.agentcountry.ListAgentCountry;
import org.springframework.stereotype.Service;
import org.summerframework.model.SummerService;
import org.summerframework.model.SummerServiceBean;

import java.util.List;

@Service
@SummerService
public class ListAgentCountryService  implements SummerServiceBean<ListAgentCountry> {
    @Override
    public void sum(ListAgentCountry summer) {

        SqlSelect selectArticle = SqlSelect.selec("*")
                .fromClassName(AgentCountry.class)
                .order_by("en_name asc");
        List<AgentCountry> s = DaoList.s(AgentCountry.class, selectArticle);
        summer.setSummerResult(s);
    }
}